<?php $this->import('Header') ?>
	<div class="container">
		<div class="row">
			<div class="col-xs-9">
				<div class="slogan">
					<img src="/Resource/images/index.jpg" width="100%" />
				</div>
				<h4>紫薇觉得这些狗狗你可能会喜欢哦~</h4>
				<div class="xm-list">
					<?php foreach($users as $user) {?>
					<div class="well">
						<div class="row">
							<div class="col-xs-2">
								<a href="/dog_u<?php echo $user['UserId'] ?>.html" target="_blank">
									<img src="<?php echo $user['Photo'] ? \Util\User::getUserPhoto($user['Photo'], 400, 400) : '/Resource/images/nohead_new.jpg' ?>" class="img img-rounded">
								</a>
							</div>
							<div class="col-xs-8">
								<p>
									<a href=""><?php echo $user['Username'] ? $user['Username'] : $user['Email'] ?></a>
									<?php echo $user['cityInfo'] ? implode('', $user['cityInfo']) : '-' ?> <?php echo $user['Sex'] == '1' ? 'GG' : 'MM' ?>
									<?php echo \Util\User::getOld($user['Birthday'])?>
								</p>
								<p class="text_bnb"><?php echo $user['Desc'] ? $user['Desc'] : '-' ?></p>
								<p class="investment">
									<span>照片<strong class="text-success"> 3</strong>张</span>
									<span><strong class="text-success">100</strong>人关注</span>
								</p>
								<p class="technology-user">
									<?php if (in_array(\Data\User::EATING_HABITS_DOG_FOOD, explode(',', $user['EatingHabits']))) { ?>
										<span class="label label-success">狗粮</span>
									<?php } ?>
									<?php if (in_array(\Data\User::EATING_HABITS_DOG_MIXED, explode(',', $user['EatingHabits']))) { ?>
										<span class="label label-success">混合食物</span>
									<?php } ?>
									<?php if (in_array(\Data\User::EATING_HABITS_DOG_DIY, explode(',', $user['EatingHabits']))) { ?>
									<span class="label label-success">自制狗粮</span>
								<?php } ?>
								</p>
							</div>
							<div class="col-xs-2">
								<a href="" class="btn btn-default">打招呼</a>
							</div>
						</div>
					</div>
					<?php }  ?>
				</div>
				<center><a href="" class="btn btn-success">搜索更多狗狗</a></center>
			</div>
			<div class="col-xs-3">
				<div>
					<a href=""> 大家正在记录狗狗一生...</a>
				</div>
				<?php if (!$_currentUserInfo) { ?>
					<div class="well" id="js-login-from">
						<form class="">
							<h4>用户登录</h4>
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></div>
									<input type="text" name="email" class="form-control" placeholder="邮件/手机号">
								</div>
							</div>
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></div>
									<input type="password" name="password" class="form-control" placeholder="密码">
								</div>
							</div>
							<div class="form-group">
								<label><input type="checkbox"> 记住我</label>
								<label><a href="javascript:;">忘记密码？</a></label>
								<button type="submit" class="btn btn-default">登录</button>
							</div>
						</form>
						<hr />
						<div>
							<span>第三方登录：</span>
						<span>
							<a href="/OAuth/QQ?fromurl=<?php echo urlencode('/') ?>"><img src="/Resource/images/qq_l.png" height="30" width="30"></a>
							<a href="/OAuth/Weibo?fromurl=<?php echo urlencode('/') ?>"><img src="/Resource/images/weibo_l.png" height="30" width="30"></a>
						</span>
						</div>
						<div>
							<span>没有账号？</span>
							<a href="">点击注册</a>
						</div>
					</div>
				<?php } else { ?>
					<div class="well user-zone">
						<div class="row">
							<div class="user-photo col-xs-5">
								<img class="img-rounded" src="<?php echo $user['Photo'] ? \Util\User::getUserPhoto($user['Photo'], 400, 400) : '/Resource/images/nohead_new.jpg' ?>">
							</div>
							<div class="col-xs-7">
								<span class="text-info name"><?php echo $user['Username'] ? $user['Username'] : $user['Email'] ?></span><br />
								<span class="gz text-info">关注：<a href="">1</a></span><br />
								<span class="gz text-info">粉丝：<a href="">1</a></span><br />
								<a class="email" href=""><i class="glyphicon glyphicon-envelope "></i></a>&nbsp;&nbsp;
								<a class="email" href="/setting.html" title="编辑"><i class="glyphicon glyphicon-edit"></i></a>
							</div>
						</div>
					</div>
				<?php } ?>
			</div>
		</div>
	</div>
<?php $this->import('Footer') ?>
<script>
	seajs.init();
</script>